﻿
Imports std
Imports elpmis

Public Class lpmsapp
    Inherits scriptapp

    Protected Sub New(ByVal ifuncs As vector(Of [function]))
        MyBase.New(ifuncs)
    End Sub

    Public Shared Shadows Function parse(ByVal script As String, ByRef output As lpmsapp) As Boolean
        Dim funcs As vector(Of [function]) = Nothing
        If parseImpl(script, funcs) Then
            output = New lpmsapp(funcs)
            Return True
        Else
            Return False
        End If
    End Function

    Public Function main() As Boolean
        Dim rtn As bare_variable = Nothing
        Return invoke(runrroom.defaultValue.scriptEntryFunction, rtn:=rtn) AndAlso _
               Not rtn Is Nothing AndAlso rtn.true()
    End Function
End Class
